home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 424_02 / ED-157 / select.c < prev    next >
C/C++ Source or Header  |  1994-02-08  |  1KB  |  54 lines

  1. /*
  2.  * Copyright (C) 1992 by Rush Record
  3.  * Copyright (C) 1993 by Charles Sandmann (sandmann@clio.rice.edu)
  4.  * 
  5.  * This file is part of ED.
  6.  * 
  7.  * ED is free software; you can redistribute it and/or modify it under the terms
  8.  * of the GNU General Public License as published by the Free Software Foundation.
  9.  * 
  10.  * ED is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  11.  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  12.  * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  13.  * 
  14.  * You should have received a copy of the GNU General Public License along with ED
  15.  * (see the file COPYING).  If not, write to the Free Software Foundation, 675
  16.  * Mass Ave, Cambridge, MA 02139, USA.
  17.  */
  18. #include "opsys.h"
  19.  
  20. #include "ctyp_dec.h"
  21. #include "rec.h"
  22. #include "window.h"
  23. #include "ed_dec.h"
  24.  
  25. /******************************************************************************\
  26. |Routine: doselect
  27. |Callby: edit paint paint_window
  28. |Purpose: Displays the select marker.
  29. |Arguments:
  30. |    none
  31. \******************************************************************************/
  32. void doselect(r,byt)
  33. rec_ptr r;
  34. Int byt;
  35. {
  36.     Uchar b[2];
  37.  
  38.     reverse();
  39.     if(r == BASE)
  40.         b[0] = get_eob_char();
  41.     else if(byt == r->length)
  42.         b[0] = ' ';
  43.     else if(HEXMODE)
  44.         b[0] = '<';
  45.     else if((b[0] = r->data[byt]) == '\t')
  46.         b[0] = ' ';
  47.     else if(NONPRINTNCS(b[0]))
  48.         b[0] = '<';
  49.     b[1] = '\0';
  50.     putz((Char *)b);
  51.     normal();
  52. }
  53.  
  54.